package hotel.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 订单项详情/住房详情，记录一个房间内的所有住户信息
 * 入住人姓名customerName，身份证号码id_number，联系方式tele
 */
@Entity
@Table
public class ItemDescription {

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int descid;
	
	@JoinColumn
	@ManyToOne
	private SalesLineItem salesLineItem;//对应的订单项
	
	@Column(nullable=false)
	private String customerName;//入住人姓名
	
	@Column(nullable=false)
	private String id_number;//证件号码
	
	@Column(nullable=false)
	private String tele;//联系方式

	public int getDescid() {
		return descid;
	}

	public void setDescid(int descid) {
		this.descid = descid;
	}

	public SalesLineItem getSalesLineItem() {
		return salesLineItem;
	}

	public void setSalesLineItem(SalesLineItem salesLineItem) {
		this.salesLineItem = salesLineItem;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getId_number() {
		return id_number;
	}

	public void setId_number(String id_number) {
		this.id_number = id_number;
	}

	public String getTele() {
		return tele;
	}

	public void setTele(String tele) {
		this.tele = tele;
	}
}
